module.exports = function(app) {

    // 配置全局路由
    require("./routes/global")(app);
    // 模块begin
    // /test
    require("./routes/module_test")(app);
    // /mock
    require("./routes/module_mock")(app);
};

if (module.hot) {
    var acceptedDepencies = [
        "./routes/global",
        "./routes/module_test",
        "./routes/module_mock"
    ];

    module.hot.accept(acceptedDepencies, function() {
        try {
            require("./routes/global");
            require("./routes/module_test");
            require("./routes/module_mock");
        } catch (e) {
            console.log(e.stack);
        }
    });
}
